.class Lcom/xiaomi/notes/NoteListActivity$3;
.super Ljava/lang/Object;
.source "NoteListActivity.java"

# interfaces
.implements Landroid/widget/AdapterView$OnItemLongClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/xiaomi/notes/NoteListActivity;->initListener()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/xiaomi/notes/NoteListActivity;


# direct methods
.method constructor <init>(Lcom/xiaomi/notes/NoteListActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 426
    iput-object p1, p0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemLongClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)Z
    .locals 17
    .parameter
    .parameter "view"
    .parameter "position"
    .parameter "id"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)Z"
        }
    .end annotation

    .prologue
    .line 429
    .local p1, parent:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    move-wide/from16 v0, p4

    long-to-int v0, v0

    move v4, v0

    invoke-static {v4}, Lcom/xiaomi/notes/NoteListActivity;->isFolder(I)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 430
    const/4 v4, 0x0

    .line 476
    :goto_0
    return v4

    .line 434
    :cond_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    invoke-static {v4}, Lcom/xiaomi/notes/NoteListActivity;->access$300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ListView;

    move-result-object v4

    invoke-virtual {v4}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v13

    check-cast v13, Lcom/xiaomi/notes/AdapterNoteItem;

    .line 437
    .local v13, adapter:Lcom/xiaomi/notes/AdapterNoteItem;
    invoke-virtual {v13}, Lcom/xiaomi/notes/AdapterNoteItem;->getFolderInfo()Ljava/util/List;

    move-result-object v4

    if-nez v4, :cond_1

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    invoke-static {v4}, Lcom/xiaomi/notes/NoteListActivity;->access$100(Lcom/xiaomi/notes/NoteListActivity;)I

    move-result v4

    const/4 v5, -0x1

    if-ne v4, v5, :cond_1

    .line 438
    const/4 v4, 0x0

    goto :goto_0

    .line 442
    :cond_1
    sget-object v4, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    const-string v5, "layout_inflater"

    invoke-virtual {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v16

    check-cast v16, Landroid/view/LayoutInflater;

    .line 444
    .local v16, objInflater:Landroid/view/LayoutInflater;
    const v4, 0x7f030007

    const/4 v5, 0x0

    const/4 v6, 0x0

    move-object/from16 v0, v16

    move v1, v4

    move-object v2, v5

    move v3, v6

    invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v5

    .line 446
    .local v5, v:Landroid/view/View;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    new-instance v6, Lcom/xiaomi/notes/DragView;

    sget-object v7, Lcom/xiaomi/notes/NoteListActivity;->context:Lcom/xiaomi/notes/NoteListActivity;

    invoke-direct {v6, v7}, Lcom/xiaomi/notes/DragView;-><init>(Landroid/content/Context;)V

    invoke-static {v4, v6}, Lcom/xiaomi/notes/NoteListActivity;->access$402(Lcom/xiaomi/notes/NoteListActivity;Lcom/xiaomi/notes/DragView;)Lcom/xiaomi/notes/DragView;

    .line 447
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    invoke-static {v4}, Lcom/xiaomi/notes/NoteListActivity;->access$400(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DragView;

    move-result-object v4

    move-object v0, v13

    move/from16 v1, p3

    invoke-virtual {v0, v1}, Lcom/xiaomi/notes/AdapterNoteItem;->getItem(I)Ljava/util/Map;

    move-result-object v6

    const/4 v9, 0x0

    const/4 v10, 0x0

    invoke-virtual/range {p2 .. p2}, Landroid/view/View;->getWidth()I

    move-result v11

    invoke-virtual/range {p2 .. p2}, Landroid/view/View;->getHeight()I

    move-result v12

    move-wide/from16 v7, p4

    invoke-virtual/range {v4 .. v12}, Lcom/xiaomi/notes/DragView;->show(Landroid/view/View;Ljava/util/Map;JIIII)V

    .line 451
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    invoke-static {v4}, Lcom/xiaomi/notes/NoteListActivity;->access$000(Lcom/xiaomi/notes/NoteListActivity;)I

    move-result v4

    packed-switch v4, :pswitch_data_0

    .line 476
    .end local v5           #v:Landroid/view/View;
    :goto_1
    :pswitch_0
    const/4 v4, 0x1

    goto :goto_0

    .line 453
    .restart local v5       #v:Landroid/view/View;
    :pswitch_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    invoke-static {v4}, Lcom/xiaomi/notes/NoteListActivity;->access$300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ListView;

    move-result-object v4

    invoke-virtual {v4}, Landroid/widget/ListView;->getHeight()I

    move-result v4

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v5, v0

    .end local v5           #v:Landroid/view/View;
    invoke-static {v5}, Lcom/xiaomi/notes/NoteListActivity;->access$300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ListView;

    move-result-object v5

    invoke-virtual {v5}, Landroid/widget/ListView;->getPaddingTop()I

    move-result v5

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v6, v0

    invoke-static {v6}, Lcom/xiaomi/notes/NoteListActivity;->access$300(Lcom/xiaomi/notes/NoteListActivity;)Landroid/widget/ListView;

    move-result-object v6

    invoke-virtual {v6}, Landroid/widget/ListView;->getPaddingBottom()I

    move-result v6

    add-int/2addr v5, v6

    sub-int v14, v4, v5

    .line 455
    .local v14, h:I
    const/4 v15, 0x0

    .line 456
    .local v15, lng:I
    invoke-virtual {v13}, Lcom/xiaomi/notes/AdapterNoteItem;->getFolderInfo()Ljava/util/List;

    move-result-object v4

    if-eqz v4, :cond_2

    .line 457
    invoke-virtual {v13}, Lcom/xiaomi/notes/AdapterNoteItem;->getFolderInfo()Ljava/util/List;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    mul-int/lit8 v15, v4, 0x60

    .line 459
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    const/4 v5, 0x0

    invoke-static {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->access$502(Lcom/xiaomi/notes/NoteListActivity;I)I

    .line 460
    if-ge v15, v14, :cond_3

    .line 461
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    const/4 v5, 0x0

    invoke-static {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->access$602(Lcom/xiaomi/notes/NoteListActivity;I)I

    .line 465
    :goto_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    const/4 v5, 0x0

    invoke-static {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->access$702(Lcom/xiaomi/notes/NoteListActivity;I)I

    .line 467
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v5, v0

    invoke-static {v5}, Lcom/xiaomi/notes/NoteListActivity;->access$100(Lcom/xiaomi/notes/NoteListActivity;)I

    move-result v5

    invoke-virtual {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->synDB(I)V

    .line 468
    move-object v0, v13

    move-wide/from16 v1, p4

    invoke-virtual {v0, v1, v2}, Lcom/xiaomi/notes/AdapterNoteItem;->deleteNoteItem(J)V

    goto :goto_1

    .line 463
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    sub-int v5, v14, v15

    invoke-static {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->access$602(Lcom/xiaomi/notes/NoteListActivity;I)I

    goto :goto_2

    .line 471
    .end local v14           #h:I
    .end local v15           #lng:I
    .restart local v5       #v:Landroid/view/View;
    :pswitch_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    invoke-static {v4}, Lcom/xiaomi/notes/NoteListActivity;->access$800(Lcom/xiaomi/notes/NoteListActivity;)Lcom/xiaomi/notes/DBOperate;

    move-result-object v4

    const/4 v5, -0x1

    move-object v0, v4

    move-wide/from16 v1, p4

    move v3, v5

    invoke-virtual {v0, v1, v2, v3}, Lcom/xiaomi/notes/DBOperate;->updateNote(JI)V

    .line 472
    .end local v5           #v:Landroid/view/View;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/xiaomi/notes/NoteListActivity$3;->this$0:Lcom/xiaomi/notes/NoteListActivity;

    move-object v4, v0

    const/4 v5, 0x0

    invoke-virtual {v4, v5}, Lcom/xiaomi/notes/NoteListActivity;->setState(I)V

    .line 473
    move-object v0, v13

    move-wide/from16 v1, p4

    invoke-virtual {v0, v1, v2}, Lcom/xiaomi/notes/AdapterNoteItem;->deleteNoteItem(J)V

    goto/16 :goto_1

    .line 451
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_0
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method
